Skip to content

Revive webmcp dead features - #2

Merged
theprogrammersingh merged 3 commits into
mainfrom
revive-webmcp-dead-features
Aug 29, 2026
Merged

Revive webmcp dead features#2
theprogrammersingh merged 3 commits into
mainfrom
revive-webmcp-dead-features

Conversation

@theprogrammersingh

Copy link
Copy Markdown
Owner

No description provided.

The App Hosting build died before installing a single dependency:

    Installing pnpm v12.0.0
    pnpm v12.0.0 detected (>= 11.0.0), downloading tarball.
    Error: Cannot find module '/layers/google.nodejs.pnpm/pnpm_engine/bin/dist/pnpm.mjs'

Nothing asked for pnpm 12. `packageManager` says `pnpm@10.14.0` and CI resolves
that correctly, but the buildpack does not read `packageManager` — it reads
`engines.pnpm`, treats it as a semver *range*, and installs the highest match
from the registry. Our `">=10"` therefore meant "whatever pnpm shipped most
recently", which is 12.0.0 as of today; confirmed by resolving the range against
registry.npmjs.org rather than inferring it from the log.

pnpm 12 then hits a broken branch in the buildpack itself: for >= 11 it unpacks
the standalone GitHub release, which is a self-contained binary, but still
launches it as `node <layer>/bin/dist/pnpm.mjs` — a path that exists only in the
npm package layout. So the failure was never about our dependencies, and no
local or CI run could have caught it, because both honour `packageManager`.

`engines.pnpm` is now an exact `10.14.0`, matching `packageManager` and the
lockfile it generated. This has to stay below 11 until that buildpack branch is
fixed.

Also drops BUILD availability from NODE_ENV, which would have been the next
failure. The buildpack installs with `pnpm install --prod`, and under
NODE_ENV=production that omits every devDependency — while this build is almost
entirely devDependencies: the Angular CLI, the Nest CLI, typescript. Nothing in
the build reads NODE_ENV (Angular takes `production` from angular.json); the
only reader in the repo is `EnvService.partnerOrigin`, per request, at runtime.
So RUNTIME availability loses nothing.

The `Failed to find version for package @angular/core in pnpm lockfile` warnings
above the failure are unrelated and expected: that is the `firebaseangular`
buildpack's detect step, which looks for Angular in the root importer and finds
it under `frontend:` instead. It exits 1 meaning "does not apply", which is
correct — this repo builds through the generic Node path with an explicit
buildCommand and runCommand.

Both gotchas recorded in apphosting.yaml and CLAUDE.md, since neither is
reproducible outside a real deploy.

Verified locally: `pnpm install --frozen-lockfile` clean on 10.14.0,
`pnpm run build` exit 0 through prerender and the SEO stamp.
…IC_ORIGIN a scheme

Two problems that would have survived a green build, found while confirming the
pnpm fix against the real backend.

**`*.hosted.app` was missing from NG_ALLOWED_HOSTS, and it is the domain this
service actually answers on.** The backend serves
`actuo--actuo-2f1f3.asia-east1.hosted.app`; the allowlist listed `*.web.app` and
`*.firebaseapp.com`, which are Firebase Hosting domains, not App Hosting ones. I
introduced this in the previous commit and described `*.hosted.app` as "not a
domain this deploy serves from", which was wrong — `apphosting:backends:list`
says otherwise. Off the allowlist Angular does not error, it silently renders
client-side, so the symptom would have been a working site with the SSR and
structured-data work in §8.5 quietly gone.

Checked the matching rule rather than assuming it: `isHostAllowed` turns `*.x`
into `hostname.endsWith('.x')`, so one wildcard covers the multi-label
`actuo--actuo-2f1f3.asia-east1.hosted.app`. The other entries are kept — they
cost nothing and cover a Firebase Hosting rewrite if one is ever put in front.

**PUBLIC_ORIGIN had no scheme.** stamp-seo.mjs substitutes the value verbatim,
so `actuo.programmersingh.dev` produced
`<loc>actuo.programmersingh.dev/</loc>` — which `new URL()` rejects. The build
would not have failed; the sitemap would just have been invalid and og:image
unresolvable. Now `https://actuo.programmersingh.dev`, and the requirement is
written next to the value because the variable name does not imply it.

That domain is NXDOMAIN today, which is a deliberate choice to keep the canonical
pointing where the site will live rather than where it currently is. Recorded as
a prerequisite in the file: attach it to the backend and point DNS, or the
canonical advertises a dead host.

Verified: build exit 0, 28 URLs stamped absolute across 7 files, sitemap `<loc>`
and `<link rel=canonical>` both valid absolute URLs, and `ng-server-context`
still present in the prerendered index.html.
@theprogrammersingh
theprogrammersingh merged commit 07a621a into main Aug 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant